<include file="Public:header"/>
<body data-tuktuk="boxes">
<include file="Public:left"/>
<include file="Public:aside"/>


    <section>
        <header>
            <h3 class="on-left text thin">{$Think.config.APP_NAME}</h3>
            <a href="{:U('Admin/Index/chooseApp')}" class="on-right text big icon list" >切换</a>
        </header>
        <hr />
        <article class="padding scroll">
            <div class="margin-bottom">
                <h4 class="text book inline">新增页面导航</h4>
                <a href="{:U('Admin/Nav/index')}" class="button on-right theme small icon back" >返回</a>
            </div>            
            <hr />
            <form name="form" method="post" action="{:U('Admin/Nav/update')}" class="margin form-validate">
            <input type="hidden" name="id" value="{$vo.id}" />
                <fieldset>
                    <label>标题:<small>导航标题</small></label>
                    <input value="{$vo.name}" type="text" name="name" >
                </fieldset>

                <fieldset>
                    <label>导航图标:<small>在调用图片信息的时候会显示</small></label>
                    <input value="{$vo.icon}" type="text" name="icon"  >
                </fieldset>

                <fieldset>
                    <label>排序:<small>数字越小越靠前</small></label>
                    <input value="{$vo.idx}" type="text" name="idx">
                </fieldset>

                <fieldset>
                    <label>外网连接:<small>是否作为外网连接</small></label>
                    <span data="{$vo.module}" class="select">
                        <select name="module">
                            <option value="info" >否</option>
                            <option value="url">是</option>
                        </select>
                    </span>
                </fieldset>

                <fieldset style="display:none">
                    <label>外网网址:<small>将会跳转到该网址</small></label>
                    <input value="{$vo.url}" type="text" name="url">
                </fieldset>

                <hr />
                <button type="submit">保存</button>
            </form>
            
            
        </article>

        <footer class="bck dark text center">
            Powered by <a href="http://www.weiduniang.com" class="color theme text bold">Weiduniang</a>
        </footer>
    </section>
    
</body>
<load href="Public/js/app.js" />
<script type="text/javascript">
$(function(){
    $('select[data]').each(function(){
        var v = $(this).attr('data');
        $(this).val(v);
    })
    $('[name=module]').on('change',function(){
        var v = $(this).val();
        if (v == 'url') {
            $('[name=url]').parent().show();
        }else{
            $('[name=url]').parent().hide();
            $('[name=url]').val('');
        }
    })
})    
</script>
</html>
